package com.blog.aop;

import com.blog.common.CacheData;
import com.blog.model.LinkModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 初始化友情链接
 * @author jiafujun
 * 2020-06-19 16:36:28
 **/
@Component
@Order(value = 2)
public class LinkRunner implements CommandLineRunner {
    private static Logger logger = LoggerFactory.getLogger(LinkRunner.class);

    @Override
    public void run(String... args) throws Exception {
        /*LinkModel model=new LinkModel();
        model.setTitle("百度");
        model.setUrl("https://www.baidu.com/");
        CacheData.setLinkData(model);*/
        logger.info("友情链接加载完成--------------------");
    }
}
